class MemberEvent < ActiveRecord::Base
  belongs_to :acting_member, :class_name => "Member"
  belongs_to :target_member, :class_name => "Member"
  belongs_to :other_target_member, :class_name => "Member"
  belongs_to :event

  def replaced_member(actor, target, replacement, event)
    self.acting_member = actor
    self.target_member = target
    self.other_target_member = replacement
    self.event = event
    self.description = "replaced"
  end

  def removed_member(actor, target, event)
    self.acting_member = actor
    self.target_member = target
    self.event = event
    self.description = "removed"
  end
end
